home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / CADAR / Permutate / strawinski-rotation < prev   
Lisp/Scheme  |  1998-10-22  |  2KB  |  41 lines

  1. strawinski-rotation 
  2. row &key (inv 'a) (chords t)
  3.  
  4.  
  5. When Strawinski started to use 12-tone rows in his
  6. compositions he added his own way of producing chordal
  7. material so that he could get his beloved major/minor
  8. tetra-chords.
  9.  
  10. This function takes the original row and its inversion
  11. and divides them into 4 hexachords.
  12. It then uses cyclic-rotation which are transposed so that
  13. the beginning note is always the same which gives you
  14. 6 rows of each hexachord.
  15. All in all 24 new rows.
  16. It then makes chords out of the vertical rows.
  17.  
  18.  
  19. (setq row (rnd-order (list-a-scale 'a 12) :seed 0.1))
  20. ->(C A H D I F E B L J K G)
  21.  
  22. (setq s-chords 
  23.       (strawinski-rotation row :chords t :inv (car row)))
  24. ->((CCCCCC AJ-CH-B-B HFDE-E-D DKAB-GE IH-D-BBA FE-FG-DF) (EEEEEE BOCFAC LMDB-C-B JN-B-B-FJ KJ-D-EFH GH-GGDI) (CCCCCC E-FG-DFF -D-BBAIH B-GEDKA -E-DHFDE -BAJ-CH-B) (AAAAAA D-KC-BEC -H-IBDGF -F-JFFJ-F -G-FHI-B-D -C-DK-CB-E))
  25.  
  26. The first of chord of each list is of course useless
  27. but just use (mapcar #'cdr s-chords)
  28. ->((AJ-CH-B-B HFDE-E-D DKAB-GE IH-D-BBA FE-FG-DF) (BOCFAC LMDB-C-B JN-B-B-FJ KJ-D-EFH GH-GGDI) (E-FG-DFF -D-BBAIH B-GEDKA -E-DHFDE -BAJ-CH-B) (D-KC-BEC -H-IBDGF -F-JFFJ-F -G-FHI-B-D -C-DK-CB-E))
  29.  
  30.  
  31. when :chords = nil you get non-chords.
  32.  
  33. (strawinski-rotation row :chords nil :inv (car row))
  34. ->((C A H D I F) (C J F K H E) (C -C D A -D -F) (C H E B -B G) (C -B -E -G B -D) (C -B -D E A F) (E B L J K G) (E O M N J H) (E C D -B -D -G) (E F B -B -E G) (E A -C -F F D) (E C -B J H I) (C E -D B -E -B) (C -F -B -G -D A) (C G B E H J) (C -D A D F -C) (C F I K D H) (C F H A E -B) (A D -H -F -G -C) (A -K -I -J -F -D) (A C B F H K) (A -B D F I -C) (A E G J -B B) (A C F -F -D -E))
  35.  
  36. You can also set the inversion-point with :inv 
  37. but (car row-name) is the most useful.
  38.  
  39. see also create-twelve-tone-rows to get all 48 variants
  40. of a series.
  41.